import axios from "axios";

axios.interceptors.request.use(function (config) {
  // Toast.loading('加载中',0)

  let token = JSON.parse(sessionStorage.getItem("token"));
  if (token) {
    config.headers.common["Authorization"] = `Bearer ${token}`;
  } else {
    delete config.headers.common["Authorization"];
  }
  return config;
});

axios.interceptors.response.use(function (config) {


  return config;
});
